export default {
  name: "resize",
  methods: {
    initResize(handler) {
      console.log("添加成功");
      document.addEventListener("visibilitychange", handler);
      window.addEventListener("DOMContentLoaded", handler);
      window.addEventListener("resize", handler);
    },
    destroyResize(handler) {
      console.log("删除成功");
      document.removeEventListener("visibilitychange", handler);
      window.removeEventListener("DOMContentLoaded", handler);
      window.removeEventListener("resize", handler);
    }
  }
};
